const express = require('./express');
// const express = require('express');



const app = express();

app.param("name", (req, res, next, value, key) => {
    console.log(value, key);
    next();
})
app.param("name", (req, res, next, value, key) => {
    console.log(value, key, '---2');
    next();
})
app.param("age", (req, res, next, value, key) => {
    console.log(value, key);
    next();
})
app.param("hobby", (req, res, next, value, key) => {
    console.log(value, key);
    next();
})
app.param("hobby", (req, res, next, value, key) => {
    console.log(value, key, '2');
    next();
})
app.param("hobby", (req, res, next, value, key) => {
    console.log(value, key, '3');
    next();
})

app.get('/hc/:name/:age/:hobby', (req, res, next) => {
    // console.log(req.params);
    res.end('aaa ok');
})



app.listen(3000, () => {
    console.log('server is listen at 3000');
})
